'''
Created on Apr 1, 2012

@author: Johnathon
'''
import One, sys

Zero = sys.modules[globals()['__name__']]


def AND(other):
        if not other.isLineValue():
            raise Exception("Tried to 'AND' something that isn't a subclass of LineValue")
        return Zero
    
def OR(other):
        if not other.isLineValue():
            raise Exception("Tried to 'OR' something that isn't a subclass of LineValue")
        return other
        
def XOR(other):
        if not other.isLineValue():
            raise Exception("Tried to 'XOR' something that isn't a subclass of LineValue")
        return other
    
def NOT():
    return One

def isLineValue():
    return True

def __repr__():
    return "0"

def __str__():
    return "0"